Caching responses to HTTP (hypertext transfer protocol) requests allows for quicker response times to subsequent requests. However, the cached responses eventually become stale (out-of-date). To address stale content, there are a few mechanisms for marking specified cache responses as invalid (commonly referred to as invalidation).
The HTTP specification provides for invalidation through expiration timestamps. Timestamp-based invalidation mechanisms, including those described in the HTTP specification, are difficult for users because they often do not know a-priori how long a cached entry will remain valid. Thus having the user set the timestamp value is problematic.
Out-of-band invalidation requires extra overhead to establish a separate connection over a special invalidation port. Also, if the caching process sits behind a firewall, opening a connection via the special port requires “poking a hole” through the firewall, which is a potential security risk. In addition, out-of-band invalidation requests can have difficulty getting scheduled if normal HTTP request activity has reached a capacity limit.
ESI (Edge Side Include) inline invalidation only works when the response body contains an HTML document since ESI tags can only be embedded in HTML in the response body.